-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nft-swap): complete refund methods #2129
Conversation
…V2 contract, some --dev args in geth conf, impl wait_for_geth_node_ready
…wap-contract-sepolia-test
…e-nft-maker-swap-contract-sepolia-test # Conflicts: # mm2src/coins/eth.rs # mm2src/mm2_main/tests/docker_tests/eth_docker_tests.rs
This reverts commit 18fa53e.
…wap-contract-sepolia-test
…etPayload format, add body: Option<String> for wasm target request, None payload in tests
…e-nft-maker-swap-contract-sepolia-test
… for MM_CTX1, remove unnecessary Geth args, simplify request_body creation, change sleep duration in tests
…e-nft-maker-swap-contract-sepolia-test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
@laruh can you please write new changes that need to be documented e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! last notes from me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
opened coins issue KomodoPlatform/coins#1115 (I cant create new labels here) |
created a label and added it to the issue. |
@laruh The above is in the PR description but we made these non-optional, please update PR description even post-merge. |
This commit does the following: - Resolves issues with NFT swap_v2 tests on Geth. - Updates NFT activation to utilize coins config. - Moves authentication message from Body to Header in Quicknode HTTP requests. - Adds optional `swap_v2_contracts` field for Ethereum platform coin activation.
* dev: (22 commits) chore(release): bump mm2 version to 2.2.0-beta (KomodoPlatform#2188) ci(docker-tests): ignore tendermint IBC tests for now (KomodoPlatform#2185) feat(nft-swap): complete refund methods (KomodoPlatform#2129) chore(release): add changelog entries for v2.1.0-beta (KomodoPlatform#2165) fix(zcoin): don't force low r signing to generate htlc pubkey for zcoin (KomodoPlatform#2184) chore(rust-analyzer): add rust-analyzer into the workspace toolchain (KomodoPlatform#2179) chore: migrate .cargo/config to .cargo/config.toml to avoid deprecation warning (KomodoPlatform#2177) fix(swaps): ensure taker payment spend confirmations (KomodoPlatform#2176) feat(nft-swap): add standalone maker contract and proxy support (KomodoPlatform#2100) feat(ETH): add `gas_limit` coins param to override default values (KomodoPlatform#2137) feat(tendermint): implement better sequence resolving logic (KomodoPlatform#2164) ci(artifact): add target for macos on apple silicon (KomodoPlatform#2163) fix(helpers): extend http to ws address conversion (KomodoPlatform#2166) fix(makerbot): add "testcoin" to provider options (KomodoPlatform#2161) fix(hd_wallet): make extended pubkey of hd wallet generic (KomodoPlatform#2159) fix(docker-tests): implement containers runtime directories (KomodoPlatform#2162) feat(tendermint): improve the `max` handling for tendermint withdraw (KomodoPlatform#2155) revert KomodoPlatform#2158 (comment) (KomodoPlatform#2160) ci(artifacts): upload build artifacts with in-tree script (KomodoPlatform#2158) test(tendermint): migrate to local/offline containerized testnets (KomodoPlatform#2128) ...
* dev: chore(mm2_main): replace lib.rs by mm2.rs as the root lib (#2178) chore(release): bump mm2 version to 2.2.0-beta (#2188) ci(docker-tests): ignore tendermint IBC tests for now (#2185) feat(nft-swap): complete refund methods (#2129) chore(release): add changelog entries for v2.1.0-beta (#2165) fix(zcoin): don't force low r signing to generate htlc pubkey for zcoin (#2184) chore(rust-analyzer): add rust-analyzer into the workspace toolchain (#2179) chore: migrate .cargo/config to .cargo/config.toml to avoid deprecation warning (#2177) fix(swaps): ensure taker payment spend confirmations (#2176)
#900
continues this PR #2100
Note: I use
nft activation with coin conf usage
formulation instead ofnft activation from coins conf
, as NFT activation still uses some platform coin fields ininitialize_global_nft
function. Actually erc20 tokens do the same ininitialize_erc20_token
func.The key point is that in
coin_conf_with_protocol
, NFT, along with all other tokens, now relies on the "protocol" from the coin config file, instead of using the configuration of the platform coin.Note
In this PR
maker_swap_v2_contract
andtaker_swap_v2_contract
non-optional fields were added for Eth platform coin activation in theeth_coin_from_conf_and_request
function.Currently, if the maker/taker V2 contract addresses are not provided in the request, an error occurs. This is a breaking change, and the legacy 'enable' RPC will fail without these fields. The NFT swap address is optional.
komodo-defi-framework/mm2src/coins/eth.rs
Lines 6247 to 6265 in 888108c
if we prefer to avoid this behavior, then I suggest, instead of returning an error, duplicate the
swap_contract_address
to themaker_swap_v2_contract
andtaker_swap_v2_contract
fields if these parameters are missing.This way, the V2 swaps can be initialized, but
send funding
process will fail since the legacy address lacks the necessary functionality. So currency won't get stuck in the swap contract.